﻿#ifndef UPLUGININFO_H
#define UPLUGININFO_H

#include "../utkcore_global.h"

#include <QObject>

class UPluginInfoPrivate;
class UIPlugin;
class UTKCORE_EXPORT UPluginInfo : public QObject
{
    Q_OBJECT
public:
    explicit UPluginInfo(QObject* parent = nullptr);
    ~UPluginInfo();

    bool loadLibrary();

    bool read(const QString &file);

    UIPlugin* iPlugin();

    QString iPluginName();

    bool isError();

    bool unload();

    QJsonObject pluginInfo() const;

private:
    QScopedPointer<UPluginInfoPrivate> d_ptr;
    Q_DECLARE_PRIVATE(UPluginInfo)
};

#endif // UPLUGININFO_H
